package com.idheima.zuoye.zuoye2;

import java.util.ArrayList;
import java.util.List;
import java.util.Random;
import java.util.stream.Collectors;
import java.util.stream.Stream;

public class Test {
    public static void main(String[] args) {
        Random r = new Random();
        ArrayList<Integer> list = new ArrayList<>();
        for (int i = 1; i <= 10; i++) {
            int a = r.nextInt(10, 21);
            list.add(a);
            System.out.println("第"+i+"次生成的数是："+a);
        }
        List<Integer> collect = list.stream().filter(x -> x > 15).collect(Collectors.toList());
        System.out.println("大于15的数字有："+collect);

    }
}
